<!--
	作者：zhushoulong1016@163.com
	时间：2014-11-27
	描述：登录页
-->
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>注册</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
		<script src="js/mui.min.js"></script>
		<script src="js/update.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/jquery-1.9.1.min.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
		<script>
		
        mui.plusReady(function() { 
        //	plus.storage.setItem('userinfo',data.user);
        //	plus.storage.getItem("userinfo");
        	
            document.getElementById('btn_register').addEventListener('tap', function() {
            	var flag =  strempty();
            	if (flag) {
            		mui.ajax({ //ajax请求
					 url: getServerIp + 'AppUser/register',
					 type: 'post',
					data: {    
                      name:$("#rs_username").val(),
                      phone:$("#rs_phone").val(),
                      password:$("#rs_password").val(),
                      repassword:$("#rs_password_re").val(),
                      verify:$("#rs_verify").val()
					}, //传参
					success: function(data, textStatus, jqXHR) {
    					var code = data.code;
    					if(code ==1){
    						alert(data.msg);
//  						plus.storage.setItem('userinfo',data.user);
    						mui.openWindow({
										url: 'login.html', 
                                        id:'login',
										extras: {
											
										}
									})
    					}else{
    						alert(data.msg);
    					}
									
					 }
				    })
            	} 
                 
          });
        });
        
		</script>
		
		<link rel="stylesheet" href="css/mui.min.css">
		<link rel="stylesheet" href="css/palm.css">
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			.mui-bar .mui-pull-left .mui-icon {
				padding-right: 5px;
				font-size: 28px;
			}
			.mui-bar .mui-btn {
				font-weight: normal;
				font-size: 17px;
			}
			.mui-bar .mui-btn-link {
				top: 1px;
			}
			.user_login {
				margin: 0;
				height: 10%;
				min-height: 40px;
			}
		</style>
	</head>

	<body>

		<header class="mui-bar mui-bar-nav">
			<button class="mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left">
				<span class="mui-icon mui-icon-left-nav" style="float: left;height: 40px;line-height: 40px;"></span>
				<img src="images/logo.png"  style=" height: 40px;"/>
			</button>
			<h1 class="mui-title">注册</h1>
		</header>
        <form class='queryform' id='loginform' style="top: 45px;">
        <div style="border: 1px solid #83E5AB;margin: 0 10%;padding: 10px;margin-bottom: 40px;background: #fff;">
        	<div class="user_login">
        		<input id="rs_username" style="border-bottom: 1px solid #9a9a9a;" type="text" placeholder="请输入用户名"/>
        	</div>
        	<div class="user_login">
        		<input id="rs_phone" style="border-bottom: 1px solid #9a9a9a;" type="tel" placeholder="请输入手机号"/>
        	</div>
        	<!--<div class="user_login">
			    <input id="rs_verify" style="width: 55%;float: left;border-bottom: 1px solid #9a9a9a;" type="text" placeholder="请输入验证码"/>
			    <div onclick="" class='button' style="width: 40%;float: right;margin: 0;">获取验证码</div>
        	</div>-->
        	<div class="user_login">
			    <input id="rs_password" style="border-bottom: 1px solid #9a9a9a;" type="password" placeholder="请输入密码"/>
        	</div>
        	<div class="user_login">
			    <input id="rs_password_re" style="border-bottom: 1px solid #9a9a9a;" type="password" placeholder="请确认密码"/>
        	</div>
        </div>
        
        <div id="btn_register" class='button'>注&nbsp&nbsp&nbsp&nbsp册</div>
	
        </form>
        
    </body>

</html>
